<?php
	//引入配置文件和数据库操作函数
	require '../../public/config.php';
	require '../../public/mysql.php';
	require '../../public/function.php';
	//连接数据库
	$link = connect();
	//准备sql和执行sql
	$sql = "select * from category";
	if ($link['error']) {
		$result = query($link['mess'], $sql);
	}
	
	$cates = getTree($result, 0);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>S54商城中心 - 添加新会员 </title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="../include/Css/general.css" rel="stylesheet" type="text/css" />
<link href="../include/Css/main.css" rel="stylesheet" type="text/css" />
</head>
<body>
<h1>
    <span class="action-span"><a href="./userList">会员列表</a>
    </span>
    <span class="action-span1"><a href="__GROUP__">S54商城中心</a></span>
    <span id="search_id" class="action-span1"> - 添加会员 </span>
    <div style="clear:both"></div>
</h1>

<div class="tab-div">
    <div id="tabbar-div">
        <p>
            <span class="tab-front" id="general-tab">通用信息</span>
        </p>
    </div>
    <div id="tabbody-div">
        <form enctype="multipart/form-data" action="action.php?a=add" method="post">
            <table width="90%" id="general-table" align="center">
                <tr>
                    <td class="label">上级分类：</td>
                    <td>
						<select name="pid">
							<option value="0">顶级分类</option>
							<?php foreach($cates as $val):?>
							<option value="<?php echo $val['id']?>"><?php echo str_repeat('&nbsp', $val['count'] * 2).'|--'.$val['name'];?></option>
							<?php endforeach;?>
						</select>
					</td>
                </tr>
				<tr>
                    <td class="label">分类名:</td>
                    <td>
						<input type="text" name="name" value=""size="30" />
                    <span class="require-field">*</span>
					</td>
                </tr>
            </table>
            <div class="button-div">
                <input type="submit" value=" 确定 " class="button"/>
                <input type="reset" value=" 重置 " class="button" />
            </div>
        </form>
    </div>
</div>

<div id="footer">
共执行 9 个查询，用时 0.025161 秒，Gzip 已禁用，内存占用 3.258 MB<br />
版权所有 &copy; 2005-2012 暴走少年哈尔，并保留所有权利。</div>
</body>
</html>